//
//  BKSearchPickViewDataSource.m
//  baokaodaxue
//
//  Created by dangyangyang on 15/5/30.
//  Copyright (c) 2015年 宏图教育. All rights reserved.
//

#import "BKSearchPickViewDataSource.h"


@implementation BKSearchPickViewDataSource

- (id)init{

    self = [super init];
    if (self) {// 在这里没有初始化的有：大学、预留
        _provArray = @[
         //            @"不限",
                     @"北京",
                     @"天津",
                     @"上海",
                     @"重庆",
                     @"河北",
                     @"河南",
                     @"山东",
                     @"山西",
                     @"安徽",
                     @"江西",
                     @"江苏",
                     @"浙江",
                     @"湖北",
                     @"湖南",
                     @"广东",
                     @"广西",
                     @"云南",
                     @"贵州",
                     @"四川",
                     @"陕西",
                     @"青海",
                     @"宁夏",
                     @"黑龙江",
                     @"吉林",
                     @"辽宁",
                     @"西藏",
                     @"新疆",
                     @"内蒙古",
                     @"海南",
                     @"福建",
                     @"甘肃"];
        _typeArray = @[@"不限",
                       @"综合",
                       @"工科",
                       @"师范",
                       @"财经",
                       @"政法",
                       @"语言",
                       @"医药",
                       @"农业",
                       @"林业",
                       @"民族",
                       @"艺术",
                       @"体育",
                       @"军事"];
        
        
        _piciArray =  @[@"不限",
                        @"提前批",
                        @"本科一批",
                        @"本科二批",
                        @"本科三批",
                        @"高职专科"];
        
        _wenliArray = @[@"不限",
                        @"文科",
                        @"理科"];
        
        _jxjArray = @[@"新生奖学金",
                      @"入学奖学金",
                      @"助学金",
                      @"国家助学贷款",
                      @"地区助学贷款"];
        
        _buzhuArray = @[@"有",
                        @"无"];
        _feileiArray =@[@"不限",
                        @"非国有控股",
                        @"国有控股",
                        @"民营房产"];
        
        _zhiweiArray = @[@"不限",
                         @"实际控制人",
                         @"总经理",
                         @"副总经理"];
        
        _year = @[@"不限",
                  @"2015",
                  @"2016",
                  @"2017"];
        _banji = @[@"1",@"2",@"3",@"4",@"5",@"6",@"7",@"8",@"9",@"10",@"11",@"12",@"13",@"14",@"15",@"16",@"17",@"18",@"19",@"20",@"21",@"22",@"23",@"24",@"25",@"26",@"27",@"28",@"29",@"30",@"A",@"B",@"C",@"D",@"E",@"F",@"G",@"H",@"I",@"J",@"K",@"L",@"M",@"N",@"O",@"P",@"Q",@"R",@"S",@"T",@"U",@"V",@"W",@"X",@"Y",@"Z"];
        _benzhuanArray = @[@"不限",
                           @"本科",@"专科"];
        _mianfeiArray = @[@"不限",@"国防生",@"定向生",@"免费师范生"];
    }
    
    
    
    return self;
}

- (NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView{

    return 1;
}

- (NSInteger)pickerView:(UIPickerView *)pickerView numberOfRowsInComponent:(NSInteger)component{

    switch (pickerView.tag) {
        case KAOQU:
            return [_provArray count];
            break;
        case ZHUANYE:
            return [_typeArray count];
            break;
        case PICI:
            return [_piciArray count];
            break;
        case WENLI:
            return [_wenliArray count];
            break;
        case COLLEAGE:
            return [_colleageArray count];
            break;
        case JIANGXUEJIN:
            return [_jxjArray count];
            break;
        case FEILEI:
            return [_feileiArray count];
            break;
        case ZHIWEI:
            return [_zhiweiArray count];
            break;
        case BANJI:
            return [_banji count];
            break;
        case JIESHU:
            return [_year count];
            break;
        case BUZHU:
            return [_buzhuArray count];
            break;
        case QITA:
            return [_dataArray count];
            break;
        case BENZHUN:
            return [_benzhuanArray count];
        case MIANFEI:
            return [_mianfeiArray count];
        default:
            break;
    }
    return 3;
    
}

- (NSString *)pickerView:(UIPickerView *)pickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component{
    switch (pickerView.tag) {
        case KAOQU:
            return _provArray[row];
            break;
        case ZHUANYE:
            return _typeArray[row];
            break;
        case PICI:
            return _piciArray[row];
            break;
        case WENLI:
            return _wenliArray[row];
            break;
        case COLLEAGE:
            return _colleageArray[row][@"name"];
            break;
        case JIANGXUEJIN:
            return _jxjArray[row];
            break;
        case FEILEI:
            return _feileiArray[row];
            break;
        case ZHIWEI:
            return _zhiweiArray[row];
            break;
        case BANJI:
            return _banji[row];
            break;
        case JIESHU:
            return _year[row];
            break;
        case BUZHU:
            return _buzhuArray[row];
            break;
         case QITA:
            return _dataArray[row];
            break;
        case BENZHUN:
            return _benzhuanArray[row];
        case MIANFEI:
            return _mianfeiArray[row];
            
        default:
            break;
    }
    return 0;
    
}

@end
